tools/libxl: Prepare to write multiple records with EMULATOR headers
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 4 Aug 2015 17:16:34 +0000 (18:16 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 5 Aug 2015 09:46:46 +0000 (10:46 +0100)
commit11106a244c165f154362625f13b844a8e37cada4
tree60085285b2d1f28a622ad4f04fa8d42e4b5ace66
parent874820999dd51533ca408ec72e8bba2a35cd1207
tools/libxl: Prepare to write multiple records with EMULATOR headers

With the newly specified EMULATOR_XENSTORE_DATA record, there are two
libxl records with an emulator subheader.  Refactor the existing code to
make future additions easier, and rename some functions for consistency
with the new scheme.

* Calculate the subheader at stream start time, rather than on the fly.
  Its contents are not going to change.
* Introduce a new setup_emulator_write() to insert a sub header in the
  appropriate place before a blob of data.
* Rename *toolstack_* to *emulator_xenstore_*
* Rename *emulator_* to *emulator_context_*

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
tools/libxl/libxl_internal.h
tools/libxl/libxl_stream_write.c